package chapterSystem.client.interfaceDrawing.activities;

import chapterSystem.client.ChapterSystemService;
import chapterSystem.client.callbacks.LoggCallback;
import chapterSystem.client.model.entitiesInt.Brother;
import chapterSystem.client.model.enums.ActivityType;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.StackLayoutPanel;

/**
 * User: Hasp
 * Date: 05.04.12
 * Time: 22:43
 */
public class MainActivity extends Activity {

    public MainActivity(final Brother brother) {
        super(brother, ActivityType.MAIN);
    }

    @Override
    public void drawActivity(StackLayoutPanel workArea) {
        workArea.clear();

        HTML info = new HTML("My Info");
//        HTML misc1 = new HTML("Misc1");
//        HTML misc2 = new HTML("Misc2");
//        HTML misc3 = new HTML("Misc3");


        workArea.add(new HTML("<h3>Hello, " + (brother.getName() == null ? "Unnamed" : brother.getName()) + "!</h3>\n" +
                "<h3>Your Battle Rank is: " + brother.getRankBattle() + "\n<h3>Your Work Rank is: " +
                brother.getRankWork() + "\n<h3>Your have " + brother.getPoints() + " points"), info, 4);
        /*workArea.add(new HTML("Here will be something else"), misc1, 4);
        workArea.add(new HTML("Here will be something else"), misc2, 4);
        workArea.add(new HTML("Here will be something else"), misc3, 4);
*/
        ChapterSystemService.App.getInstance().addLog(brother.getId(), id, "Main", new LoggCallback());
    }
}
